package com.mapapp.flutter_mapapp.bean;

import android.os.Parcel;
import android.os.Parcelable;

public class ProcessBean implements Parcelable{
    private String id;
    private String processName;
    private int processOrder;
    private int createUserId;
    private String createTime;
    private String editTime;
    private int processCount;
    private double processPercent;
    private int state;
    private boolean selected;


    public boolean isSelected() {
        return selected;
    }

    public void setSelected(boolean selected) {
        this.selected = selected;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getProcessName() {
        return processName;
    }

    public void setProcessName(String processName) {
        this.processName = processName;
    }

    public int getProcessOrder() {
        return processOrder;
    }

    public void setProcessOrder(int processOrder) {
        this.processOrder = processOrder;
    }

    public int getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(int createUserId) {
        this.createUserId = createUserId;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getEditTime() {
        return editTime;
    }

    public void setEditTime(String editTime) {
        this.editTime = editTime;
    }

    public int getProcessCount() {
        return processCount;
    }

    public void setProcessCount(int processCount) {
        this.processCount = processCount;
    }

    public double getProcessPercent() {
        return processPercent;
    }

    public void setProcessPercent(double processPercent) {
        this.processPercent = processPercent;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.id);
        dest.writeString(this.processName);
        dest.writeInt(this.processOrder);
        dest.writeInt(this.createUserId);
        dest.writeString(this.createTime);
        dest.writeString(this.editTime);
        dest.writeInt(this.processCount);
        dest.writeDouble(this.processPercent);
        dest.writeInt(this.state);
        dest.writeByte(this.selected ? (byte) 1 : (byte) 0);
    }

    public ProcessBean() {
    }

    protected ProcessBean(Parcel in) {
        this.id = in.readString();
        this.processName = in.readString();
        this.processOrder = in.readInt();
        this.createUserId = in.readInt();
        this.createTime = in.readString();
        this.editTime = in.readString();
        this.processCount = in.readInt();
        this.processPercent = in.readDouble();
        this.state = in.readInt();
        this.selected = in.readByte() != 0;
    }

    public static final Creator<ProcessBean> CREATOR = new Creator<ProcessBean>() {
        @Override
        public ProcessBean createFromParcel(Parcel source) {
            return new ProcessBean(source);
        }

        @Override
        public ProcessBean[] newArray(int size) {
            return new ProcessBean[size];
        }
    };
}
